package org.etherframework.tests.features.command.commands
{
	import org.etherframework.controller.ReactiveCommand;
	
	import raix.reactive.IObservable;
	import raix.reactive.Observable;
	
	public class ErrorReactiveCommand extends ReactiveCommand
	{	
		public function ErrorReactiveCommand() 
		{
			// We don't nee any initialization here.
			markAsInitialized();
		}
		
		override public function observable():IObservable
		{
			return Observable.defer(function():IObservable 
			{
				return Observable.error(new Error("Salute!"));
			}).delay(50);
		}
	}
}